import { ApiProperty } from '@nestjs/swagger'
import {
  IsEnum,
  IsNotEmpty,
  IsNumber,
  IsOptional,
  IsString,
  Length
} from 'class-validator'
import { ApplyStateEnum } from 'src/types/apply'

export class CreateApplyDto {
  @ApiProperty({ description: '员工ID', example: 1 })
  @IsNotEmpty({ message: '员工ID不能为空' })
  @IsNumber({}, { message: '员工ID必须为数字' })
  staffId: number
  @ApiProperty({ description: '工作状态ID', example: 1 })
  @IsNotEmpty({ message: '工作状态ID不能为空' })
  @IsNumber({}, { message: '工作状态ID必须为数字' })
  workStateId: number
  @ApiProperty({ description: '原因', example: '调薪' })
  @IsNotEmpty({ message: '原因不能为空' })
  @IsString({ message: '原因必须为字符串' })
  reason: string
  @ApiProperty({ description: '详情', example: '调薪' })
  @IsNotEmpty({ message: '详情不能为空' })
  @IsString({ message: '详情必须为字符串' })
  detail: string
  @ApiProperty({ description: '申请内容' })
  @IsNotEmpty({ message: '申请内容不能为空' })
  @IsString({ message: '申请内容必须为字符串' })
  content: string
}
